<template>
    <div v-show="this.show">
        <el-container>
            <el-container>
                <el-header>
                    Header
                </el-header>
                <el-main>
                    <MainCarousel />
                </el-main>
                <el-footer>Footer</el-footer>
            </el-container>
      </el-container>
    </div>
</template>

<script>

import MainCarousel from './MainCarousel.vue'

export default {

    components:{MainCarousel},

    data(){
        return{
            hzName:"HipHop",
            key:"2-4",
            show:false
        }
    },
    methods: {
        showPage(key){
            if(key==this.key){
                this.show = true
            }
            else{
                this.show = false   
            }
        }
    },
    mounted() {
        this.$bus.$on("showPage",this.showPage)
    },
    beforeDestroy(){
        this.$bus.$off("showPage");
    }
}
</script>

<style>
  .el-header, .el-footer {
    background-color: rgb(173, 172, 172);
    color: #1D3D4F;
    text-align: center;
    line-height: 50px;
  }
  
  .el-main {
    background-color:rgb(209, 209, 209);
    color: #1D3D4F;
    text-align: center;
    height:500px;
  }
  
  body > .el-container {
    margin-bottom: 40px;
  }
  
  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }
  
  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }
</style>
